#include <stdio.h>
#include<stdlib.h>
typedef struct TreeNode{
	int data;
	struct  TreeNode ** children;
	struct TreeNode * parent;
	int count;
}TreeNode,*Tree;
Tree InitTree(char data)
{
	Tree root = (Tree)malloc(sizeof(TreeNode));
	root->parent = NULL;
	root->children = NULL;
	root->data = data;
	root->count = 0;
	return root;
}
void createTreeNode(int data,Tree node)
{
	if(node->children == NULL){
		node->children = (TreeNode **) malloc(100 * sizeof(Tree)); //分配指针
	}
	node->children[0] = (Tree) malloc(sizeof(TreeNode));//创建文件夹
	node->children[0]->children = NULL;
	node->children[0]->parent = node;
	node->children[0]->data = data;
}
int main(int argc, char *argv[]) {
	Tree root  = InitTree(1);
	Tree dir = root;
	for(int i=0;i<10;i++)
	{
		int a;
		scanf("%d",&a);
		createTreeNode(a, dir);
		dir = dir->children[0];
	}
	Tree p = root;
	while(p)
	{
		printf("---1%d\n",p->data);
		p = p->children[0];
	}
//	for(int i=0;i<10;i++)
//	{
//			printf("%d\n",root->children[i]->data);
//	}
}